import request from './request'

/**
 * 获取所有用户数据 
 */
export const getUserslist = () => request({
  url: '/react-item',
  method: 'get'
})

/**
 * 添加用户数据
 */
export const addUser = userinfo => request({
  url: '/react-item/',
  method: 'post',
  data: userinfo
}) 

/**
 * 编辑用户数据
 */
export const editUser = userinfo => request({
  url: '/react-item',
  method: 'get',
  data: userinfo
})

/**
 * 删除用户信息
 * @param {*} userinfo 
 */
export const deleteUser = userinfo => request({
  url: '/react-item/' + userinfo.id,
  method: 'delete'
})

/**
 * 获取所有商品数据 
 */
export const getGoods = () => request({
  url: '/react-item',
  method: 'get'
})